package com.application.chiettinhdienluc.model;

import java.io.Serializable;
import java.sql.Date;
import java.util.ArrayList;

import com.application.chiettinhdienluc.data.GlobalData;

import android.content.ContentResolver;
import android.net.Uri;
import android.text.method.DateTimeKeyListener;

@SuppressWarnings("serial")
public class NhanCongModel implements Serializable {

	// table column names
	public static final String NHANCONG_TABLE_NAME = "D_NHANCONG";

	/**
	 * Content type for account / sip profile
	 */
	public final static String NHANCONG_CONTENT_TYPE = GlobalData.BASE_DIR_TYPE + ".D_NHANCONG";
	/**
	 * Item type for account / sip profile
	 */
	public final static String NHANCONG_CONTENT_ITEM_TYPE = GlobalData.BASE_ITEM_TYPE + ".D_NHANCONG";

	public final static Uri NHANCONG_ID_URI_BASE = Uri.parse(ContentResolver.SCHEME_CONTENT + "://" + GlobalData.AUTHORITY + "/" + NHANCONG_TABLE_NAME + "/");

	public static final String FIELD_NHANCONG_ID = "id";
	public static final String FIELD_MA_NHANCONG = "MA_CVIEC";
	public static final String FIELD_TEN_NHANCONG = "TEN_CVIEC";
	public static final String FIELD_QUY_CACH = "QUY_CACH";
	public static final String FIELD_DON_GIA = "DON_GIA";
	public static final String FIELD_KHU_VUC = "KHU_VUC";
	public static final String FIELD_MA_DINHMUC = "MA_DINHMUC";
	public static final String FIELD_SU_DUNG = "SU_DUNG";
	public static final String FIELD_NGAY_CAP_NHAT = "NGAY_CAP_NHAT";
	public final static String[] NHANCONG_FULL_PROJECTION = { NhanCongModel.FIELD_MA_NHANCONG, NhanCongModel.FIELD_TEN_NHANCONG, NhanCongModel.FIELD_QUY_CACH, NhanCongModel.FIELD_DON_GIA,
			NhanCongModel.FIELD_KHU_VUC, NhanCongModel.FIELD_MA_DINHMUC, NhanCongModel.FIELD_SU_DUNG, NhanCongModel.FIELD_NGAY_CAP_NHAT };

	// Empty constructor
	public NhanCongModel() {

	}

	private String _MaCongViec;
	private String _TenCongViec;
	private String _QuyCach;
	private double _DonGia;
	private String _KhuVuc;
	private String _MaDinhMuc;
	private Boolean _SuDung;
	private String _NgayCapNhat;
	
	private boolean _hasChanged = false;

	public String getMaCongViec() {
		return _MaCongViec;
	}

	public void setMaCongViec(String maCongViec) {
		this._MaCongViec = maCongViec;
	}

	public String getTenCongViec() {
		return _TenCongViec;
	}

	public void setTenCongViec(String tenCongViec) {
		this._TenCongViec = tenCongViec;
	}

	public String getQuyCach() {
		return _QuyCach;
	}

	public void setQuyCach(String quyCach) {
		this._QuyCach = quyCach;
	}

	public double getDonGia() {
		return _DonGia;
	}

	public void setDonGia(double donGia) {
		this._DonGia = donGia;
	}

	public String getKhuVuc() {
		return _KhuVuc;
	}

	public void setKhuVuc(String khuVuc) {
		this._KhuVuc = khuVuc;
	}

	public String getMaDinhMuc() {
		return _MaDinhMuc;
	}

	public void setMaDinhMuc(String maDinhMuc) {
		this._MaDinhMuc = maDinhMuc;
	}

	public Boolean isSuDung() {
		return _SuDung;
	}

	public void setSuDung(Boolean suDung) {
		if(_SuDung != suDung )
			_hasChanged = true;
		this._SuDung = suDung;
	}

	public String getNgayCapNhat() {
		return _NgayCapNhat;
	}

	public void setNgayCapNhat(String ngayCapNhat) {
		this._NgayCapNhat = ngayCapNhat;
	}
		
	public boolean hasChanged()
	{
		return _hasChanged;		
	}
	
	public void setHasChanged(boolean hasChanged)
	{
		 _hasChanged = hasChanged;		
	}	

}
